import { Column, BaseEntity as BaseModel } from "typeorm";

export default class BaseEntity extends BaseModel {
    @Column({
        type: 'bigint',
    })
    id: number;

    where(key: any, op = null, value = null, and: string = 'and'){
        return this;
    }
    orWhere(key: any, op = null, value = null) {
        return this.where(key, op, value, 'or');
    }
    find(value, key = 'id'){
        return BaseModel.findOneBy(this, {});
    }

    selectColumns(columns: Array<string> ){

    }

    get(columns: Array<string>)
    {

    }

    pagination(){
        
    }
}